<template>
  <el-container>
    <el-aside>
      <el-menu text-color="black" background-color="#ffffff">
        <el-menu-item @click="play('/admin/exprInfo')">实验信息</el-menu-item>
        <el-menu-item @click="play('/admin/exprStep')">实验步骤</el-menu-item>
        <el-menu-item @click="play('/admin/exprRecord')">实验记录</el-menu-item>
        <el-menu-item @click="play('/admin/exprData')">数据集</el-menu-item>
      </el-menu>
    </el-aside>
    <el-main>
      <router-view />
    </el-main>
  </el-container>
</template>

<script>
export default {
  methods: {
    play: function (name) {
      this.$router.push({ path: name }).catch((err) => {
        err;
      });
    },
  },
  mounted() {
    this.$router.push({ path: "/admin/exprInfo" }).catch((err) => {
      err;
    });
  },
};
</script>

<style scoped>
.el-aside {
  width: 200px;
}
</style>